package com.aw.generic.ejemplo008;

import java.util.HashSet;
import java.util.Set;

/**
 * User: gmc
 * Date: 15/06/2010
 */
public class EjemploInicializacion {
    public static void main(String[] args) {
        Set<Integer> enteros = new HashSet<Integer>();
        Set<Double> doubles = new HashSet<Double>();
        System.out.println("-->"+(enteros.getClass()==doubles.getClass()));

        Set numeros = new HashSet<Integer>();
//        if(numeros instanceof HashSet<Integer>){}
        Set<Integer> numerosEnteros = (HashSet<Integer>)numeros;

        Class<String> stringClass = String.class;
        try {
            String nuevoString = stringClass.newInstance();
        } catch (Throwable e) {
            e.printStackTrace();
        }
        
    }
}